import axios from "axios";

let http=axios.create({
    baseURL:"/api",
    timeout:1000*15,
    withCredentials:true
})
//请求拦截器
http.interceptors.request.use(config=>{
    let token=sessionStorage.getItem('qf-token')
    if(token){
        config.headers.authorization=token
    }
    return config
})
//响应拦截
http.interceptors.response.use(response=>{
    return response
    // return config
})

export default http